import request from '@/utils/request'

// 查询月卡车辆列表
export function listRelations(scBindingId,scActivationDate,scExpiryDate,scIsActive) {
  return request({
    url: '/system/smart/getmonthcards',
    method: 'get',
    params: { 
      scBindingId, // 确保只传递后端要求的 scBindingId 参数
      scActivationDate,
      scExpiryDate,
      scIsActive
    }
  })
}



// 新增月卡规则信息
export function addRelations(data) {
  return request({
    url: '/system/smart/monthadd',
    method: 'post',
    data: data
  })
}

// 修改月卡上下架状态
export function updateRelations(scMonthCardId, isactive) {
  return request({
    url: '/system/smart/getmonthupcards',
    method: 'get',
    params: {
      scMonthCardId,
      isactive
    }
  })
}
// 修改月卡规则信息
export function updateRelationsMessage(data) {
  return request({
    url: '/system/smart/updateInfo',
    method: 'post',
   data:data
  })
}

// 删除月卡车辆
export function delRelations(scBindingId) {
  return request({
    url: '/system/relations/' + scBindingId,
    method: 'delete'
  })
}
